package com.kugua.zfms.mq;

import com.alibaba.rocketmq.client.producer.DefaultMQProducer;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * <p>TODO</p>
 * <p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author cuiyh9
 * @version 1.0
 * @Date Created in 2018年11月28日 17:29
 * @since 1.0
 */
@SpringBootConfiguration
public class RocketProviderBeanFactory {

    private String GROUP = "zfmsCensorFeedProducer";

    @Bean(name="censorFeedProducer", initMethod = "start", destroyMethod = "shutdown")
    public DefaultMQProducer censorFeedProducer() {
        DefaultMQProducer producer = new DefaultMQProducer(GROUP);
        producer.setNamesrvAddr("10.16.37.110:9876");
        return producer;
    }

}
